package com.ltt.service.impl;

import com.ltt.dao.pojo.Cereals;
import com.ltt.dao.pojo.Crops;
import com.ltt.dao.vo.findAllCropsById;
import com.ltt.mapper.CropsMapper;
import com.ltt.service.CropsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ‘李天泰’
 * @version 1.0
 * @description: TODO
 * @date 2023/5/4 9:20
 */
@Service
public class CropsServiceImpl implements CropsService {
    @Autowired
    private CropsMapper cropsMapper;

    @Override
    public List<Crops> findAllCrops() {
        return cropsMapper.findAllCrops();
    }

    @Override
    public List<Cereals> findCropsByName(String name) {
        return cropsMapper.findCropsByName(name);
    }

    @Override
    public List<findAllCropsById> findAllCropsByOpenId(String openid) {
        List<findAllCropsById> files = cropsMapper.findAllCropsByOpenId(openid);
        return files;
    }
}
